﻿// Decompiled with JetBrains decompiler
// Type: MCM.LightInject.ScopeManagerProvider
// Assembly: MCMv5, Version=5.10.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7AB326B9-B2B4-41C2-9177-68E944071101
// Assembly location: D:\steam\steamapps\workshop\content\261550\2859238197\bin\Win64_Shipping_Client\MCMv5.dll

using System.Diagnostics.CodeAnalysis;

#nullable disable
namespace MCM.LightInject
{
  [ExcludeFromCodeCoverage]
  internal abstract class ScopeManagerProvider : IScopeManagerProvider
  {
    private readonly object lockObject = new object();
    private IScopeManager scopeManager;

    public IScopeManager GetScopeManager(IServiceFactory serviceFactory)
    {
      if (this.scopeManager == null)
      {
        lock (this.lockObject)
        {
          if (this.scopeManager == null)
            this.scopeManager = this.CreateScopeManager(serviceFactory);
        }
      }
      return this.scopeManager;
    }

    protected abstract IScopeManager CreateScopeManager(IServiceFactory serviceFactory);
  }
}
